import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

import org.apache.commons.lang.StringUtils;
import org.apache.shiro.crypto.hash.Sha512Hash;

public class TestMain {
	public static void main(String[] args) throws UnsupportedEncodingException {
		Sha512Hash hash = new Sha512Hash("hello1234");
		System.out.println(hash.toString());
		
	}
	public static String foldLine(String line, String eolDelimeter,
			int maxChars, String indent) {
		if (StringUtils.isBlank(line) || maxChars < 0
				|| line.length() < maxChars) {
			return line;
		}
		boolean loop = true;
		boolean first = true;
		int crnt = 0;
		int prev = 0;

		StringBuilder builder = new StringBuilder();
		while (loop) {
			prev = crnt;
			crnt = crnt + maxChars;
			if (crnt > line.length()) {
				if (prev < line.length()) {
					if (!first) {
						builder.append(indent);
					}
					builder.append(line.substring(prev));
					if (eolDelimeter != null) {
						builder.append(eolDelimeter);
					}
				}

				loop = false;
			} else {
				if (!first) {
					builder.append(indent);
				} else {
					first = false;
				}
				builder.append(line.substring(prev, crnt));
				if (eolDelimeter != null) {
					builder.append(eolDelimeter);
				}
			}
		}
		return builder.toString();
	}
}
